import { IUserInfoData } from "@/api/login/types/login"

export interface IAddAdminRequestData {
  username: string
  name: string
  /**
   * 一级管理员这个值为空
   */
  departmentId: number | undefined
  sex: string
  personalPhone: string
  officialPhone: string
  level: number
}

export interface IUpdateAdminequestData {
  username: string
  id: number
  name: string
  departmentId: number | undefined
}

export interface IGetPersonalInfoResponseData {
  user: IUserInfoData
  authority: string[]
}

export interface IGetAdminRequestData {
  page: number
  size: number
  name?: string
  departmentId: number | undefined
}

export interface IGetAdminData {
  id: number
  username: string
  name: string
  departmentId: number
  departmentName: string
  authority: string
  sex: string
  personalPhone: string
  officialPhone: string
}

export type GetAdminResponseData = IApiResponseData<{
  list: IGetAdminData[]
  total: number
}>

export interface IGetAdminByNameData {
  id: string
  name: string
}

export type GetAdminByNameResponseData = IApiResponseData<{
  users: IGetAdminByNameData[]
}>

export type GetPersonalInfoResponseData = IApiResponseData<IGetPersonalInfoResponseData>
